<?php
$this->breadcrumbs=array(
	UserModule::t('Users')=>array('admin'),
	$model->username,
);
?>
<div class="single-head">
	<h3 class="pull-left"><i class="fa fa-desktop purple"></i> <?php echo UserModule::t('View User').' "'.$model->username.'"'; ?></h3>
	<div class="breads pull-right">
		<strong>Nav</strong> : <a href="<?php echo Yii::app()->createUrl('user'); ?>">Home</a> / <a href="<?php echo Yii::app()->createUrl('user/admin'); ?>">Manage</a> / View
	</div>
	<div class="clearfix"></div>
</div>
<?php 
$this->beginWidget('zii.widgets.CPortlet', array(
	'htmlOptions'=>array(
		'class'=>''
	)
));
$this->widget('bootstrap.widgets.TbMenu', array(
	'type'=>'pills',
	'items'=>array(
		array('label'=>'List', 'icon'=>'icon-th-list', 'url'=>Yii::app()->controller->createUrl('admin?activeMail='), 'linkOptions'=>array()),
		array('label'=>'Update', 'icon'=>'icon-edit', 'url'=>Yii::app()->controller->createUrl('update',array('id'=>$model->id)),'active'=>true, 'linkOptions'=>array()),
	),
));
$this->endWidget();
?>
<?php
 
	$attributes = array(
		'id',
		'username',
	);
	
	// $profileFields=ProfileField::model()->forOwner()->sort()->findAll();
	// if ($profileFields) {
		// foreach($profileFields as $field) {
			// array_push($attributes,array(
					// 'label' => UserModule::t($field->title),
					// 'name' => $field->varname,
					// 'type'=>'raw',
					// 'value' => (($field->widgetView($model->profile))?$field->widgetView($model->profile):(($field->range)?Profile::range($field->range,$model->profile->getAttribute($field->varname)):$model->profile->getAttribute($field->varname))),
				// ));
		// }
	// }
	
	array_push($attributes,
		'password',
		'email',
		'activkey',
		'create_at',
		'lastvisit_at',
		array(
			'name' => 'superuser',
			'value' => User::itemAlias("AdminStatus",$model->superuser),
		),
		array(
			'name' => 'Role',
			'value' => Yii::app()->helper->getRole($model->id),
		),
		array(
			'name' => 'status',
			'value' => User::itemAlias("UserStatus",$model->status),
		)
	);
	
	$this->widget('zii.widgets.CDetailView', array(
		'data'=>$model,
		'attributes'=>$attributes,
	));
	

?>
